﻿using System;
using System.Collections;
using System.Collections.Generic;

namespace ConsoleApp10
{
    class Program
    {
        static void Main(string[] args)
        {
            Queue test = new Queue();
            test.Enqueue("我");
            test.Enqueue("太");
            test.Enqueue("难");
            test.Enqueue("了");

           while (test.Count != 0)
            { 
                Console.WriteLine(test.Dequeue());
            }
            //two//
            var array = test.ToArray();
            foreach (var v in test)
            {
                Console.WriteLine(v);
            }
            //three//
            IEnumerator enumerator = test.GetEnumerator();
            while (enumerator.MoveNext())
            {
                Console.Write(enumerator.Current + " ");
            }
            Console.WriteLine();
        }

    }
    }
    
    
